var mongoose = require('mongoose');
var materializeP = require('mongoose-materialized');
var Schema = mongoose.Schema;

// 定义一个普通的数据模型
var CommentSchema = new Schema({
	title:String,
    content:{type:String },
    author:String,
    date:{type:Date,default: Date.now }

});
// 将数据模型应用分页插件
CommentSchema.plugin(materializeP);

module.exports = mongoose.model('Comment', CommentSchema,'comment');